<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.java.service.*,java.util.*,com.java.model.UserSession,com.java.util.*"%>
<jsp:include page="common/header.jsp"></jsp:include>
<%
	UserSession usersession = (UserSession)session.getAttribute("user");
	String ent_id 			= (String)session.getAttribute("ent_id");
	
	String connGroup 	= "";
	String user_id 		= "";
	if(usersession!=null){
		connGroup 	= CmmUtil.nvl(usersession.getConnGroup(),"0");
		user_id 	= CmmUtil.nvl(usersession.getUser_id(),"");
	}
	

	String title 	= CmmUtil.nvl(request.getParameter("title"),"");
	String content 	= CmmUtil.nvl(request.getParameter("content"),"");
	String addfile 	= CmmUtil.nvl(request.getParameter("addfile"),"");
 	String blt_cont_no = CmmUtil.nvl(request.getParameter("blt_cont_no"),"0");

 	
	String login_nm = CmmUtil.nvl(request.getParameter("login_nm"));
	String login_pw = Crypto.EncodeBySType(CmmUtil.nvl(request.getParameter("pwd")));
	String norm_phone_no1 = CmmUtil.nvl(request.getParameter("norm_phone_no1"));
	String norm_phone_no2 = CmmUtil.nvl(request.getParameter("norm_phone_no2"));
	String norm_phone_no3 = CmmUtil.nvl(request.getParameter("norm_phone_no3"));
	String cell_phone_no1 = CmmUtil.nvl(request.getParameter("cell_phone_no1"));
	String cell_phone_no2 = CmmUtil.nvl(request.getParameter("cell_phone_no2"));
	String cell_phone_no3 = CmmUtil.nvl(request.getParameter("cell_phone_no3"));
	String email_id1 = CmmUtil.nvl(request.getParameter("email_id1"));
	String email_id2 = CmmUtil.nvl(request.getParameter("email_id2"));
	String post_no1 = CmmUtil.nvl(request.getParameter("post_no1"));
	String post_no2 = CmmUtil.nvl(request.getParameter("post_no2"));
	String post_addr = CmmUtil.nvl(request.getParameter("post_addr"));
	String detail_addr = CmmUtil.nvl(request.getParameter("detail_addr"));


	HashMap map = new HashMap();
	HashMap map1 = null;
	ArrayList list = new ArrayList();
	CommonDaoService commonservice = new CommonDaoService("Com0402lp01UpdateDao");

	map.put("user_id",user_id);
	map.put("login_nm",login_nm);
	map.put("login_pw",login_pw);
	map.put("norm_phone_no",norm_phone_no1+"-"+norm_phone_no2+"-"+norm_phone_no3);
	map.put("cell_phone_no",cell_phone_no1+"-"+cell_phone_no2+"-"+cell_phone_no3);
	map.put("email_id",email_id1 +"@"+ email_id2 );
	map.put("post_no",post_no1+post_no2);
	map.put("post_addr",post_addr);
	map.put("detail_addr",detail_addr);
	
	list = (ArrayList)commonservice.commonDaoMethod(map);
	String MSG = "정보수정을 완료하지 못했습니다. \n\n관리자에게 문의 하십시요";
	if(list != null){
		if(list.size() > 0){
			MSG = (String)((HashMap)list.get(0)).get("MSG");
		}
	}
	if (MSG.equals("OK")){
		MSG = "정보수정이 완료 되었습니다.";
	}
	
%>
<body>
<script type="text/javascript">
	alert("<%=MSG%>");
</script>
</body>
</html>
